package com.day0913;

import java.util.Arrays;
import java.util.Scanner;

public class Text4 {
    public static void main(String[] args) {
        int[] nums = {99,85,82,63,60};
        Scanner in = new Scanner(System.in);
        System.out.println("请输入插入的数：");
        int num = in.nextInt();
        int temp;
        int[] numsArray = Arrays.copyOf(nums,nums.length + 1);
        numsArray[nums.length] = num;
        for(int i = numsArray.length - 1; i > 0 ; i --){
            if(numsArray[i] > numsArray[i - 1]){
                temp = numsArray[i];
                numsArray[i] = numsArray[i - 1];
                numsArray[i - 1] = temp;
            }
        }
        System.out.print(Arrays.toString(numsArray));

    }
}
